$(function() {
	var id_prikey = sessionStorage.getItem("id_prikey")
	var code = sessionStorage.getItem("code")
	if(code == "01") {
		$(".lj").css("display", "none")
		$(".cj").css("display", "block")
	} else {

	}
	$(".mui-pull-left").click(function() {
		window.location.replace("cx")
	})
	$.post("selectActivityById", {
		"id_prikey": id_prikey
	}, function(data) {
		/*alert(JSON.stringify(data))*/
		var rel = data.data;
		$(".name").text(rel.姓名)
		$(".tel").text(rel.手机号)
		$(".sfzh").text(rel.身份证号)
		$(".hdmc").text(rel.活动名称)
		$(".djr").text(rel.登记人)
		$(".djsj").text(rel.登记时间)
		$(".ckje").text(rel.金额1+'万元')
		$(".ckjf").text(rel.抽奖券序号)
		$(".jp").text(rel.奖品名称)
		$(".cjkh").text(rel.凭证号)
	})
})
//获取办卡类型
function hdtype(code) {
	$.post("selectBusinessByactivityType", {
		"activityType": "01"
	}, function(data) {
		if(data.length > 0) {
			for(var i in data) {
				if(data[i].业务ID == code) {
					$(".blyw").text(data[i].业务名称)

				}
			}

		}
	})
}
//获取办理网点
function hb_wd(a) {
	$.post("selectDeptByActivity", {
		"activityType": "01"
	}, function(data) {
		if(data.ok) {
			var rel = data.ok
			for(var i in rel) {
				if(rel[i].deptId == a) {
					$(".blwd").text(rel[i].name)

				}
			}
		} else {

		}
	})
}

function abb(a) {
	if(a == "1900-01-01") {
		return ""
	} else {
		return a
	}
}